package com.fandou.airobot.ui.recording

import android.app.Activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import com.blankj.utilcode.util.BarUtils
import com.blankj.utilcode.util.FragmentUtils
import com.fandou.airobot.R

/**
 *
 *
 * @author zdxiang
 * @date 2020/7/9 16:48
 * 记录模式activity
 */
class RecordingActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        BarUtils.transparentStatusBar(this)
        BarUtils.setStatusBarLightMode(this, true)
        setContentView(R.layout.ai_robot_record_activity)
        FragmentUtils.add(supportFragmentManager, RecordingFragment.newInstance(), android.R.id.content, false, false)
    }

    override fun finish() {
        super.finish()
        overridePendingTransition(0, 0)
    }

    companion object {
        @JvmStatic
        fun start(context: Context) {
            val intent = Intent(context, RecordingActivity::class.java)
            context.startActivity(intent)
            (context as Activity).overridePendingTransition(0, 0)
        }
    }
}